<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;

class CreateUsersTable extends Migration {

	/**
	 * Run the migrations.
	 *
	 * @return void
	 */
	public function up()
	{
		Schema::create('users', function(Blueprint $table)
		{
			$table->increments('id');
			$table->string('name')->default('');
			$table->string('password')->default('');
			$table->string('email')->default('');
			$table->timestamps();
			$table->string('remember_token', 120)->default('');
			$table->string('avatar_file_name')->nullable();
			$table->integer('avatar_file_size')->nullable();
			$table->string('avatar_content_type')->nullable();
			$table->dateTime('avatar_updated_at')->nullable();
			$table->string('company')->default('');
			$table->string('title')->default('');
			$table->string('location')->default('');
			$table->integer('score')->default(0);
			$table->integer('solveNum')->default(0);
			$table->integer('msgcnt')->default(0);
			$table->integer('rank')->default(0);
			$table->string('utm', 64)->default('');
			$table->integer('active')->nullable()->default(0);
			$table->integer('step')->default(0);
			$table->integer('last_login_time')->default(0);
			$table->string('introduce')->nullable();
			$table->smallInteger('permission')->nullable()->default(0);
		});
        DB::update('ALTER TABLE users AUTO_INCREMENT = 5927');
	}


	/**
	 * Reverse the migrations.
	 *
	 * @return void
	 */
	public function down()
	{
		Schema::drop('users');
	}

}
